package com.example.ffmpeggni;

import android.content.Context;
import android.opengl.GLSurfaceView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

public class JCMPlayer implements GLSurfaceView.Renderer{



    JCMPlayer(Context ctx){ m_glContex = ctx; }

    private Context m_glContex;



    private native  void ndkInitVideoPlayer();
    private native  void ndkStartPlayerWithFile(String fileName);


    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config) {

    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height) {

    }

    @Override
    public void onDrawFrame(GL10 gl) {

    }


    static {
        System.loadLibrary("JCMPlayer");
    }


    public void StartVideoPlayerWithPath(String fileString) {
        ndkStartPlayerWithFile(fileString);
    }

    public void InitVideoPlayer() {
        ndkInitVideoPlayer();
    }
}
